package com.uzai.console.enums;

/**
 * 支付宝账单支付类型
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum AlipayTypeEnum {
    BALANCE_TAKEBAL(-1,"账户余额提现"),
    BALANCE_RECHARGE(0,"账户余额充值"),
    DEVICE_MOBILE_ADD(1,"购买手机端机器人"),
    DEVICE_PC_AUTH(2,"续费电脑端机器人"),
    DEVICE_MOBILE_AUTH(3,"续费手机端机器人"),
    KUAIZHAN_DOMIAN_BUY(4,"购买快站域名"),
    PRODUCT_AUTH(5,"购买功能模块"),
    EXPORT_INFO(6,"导出查询结果"),
    DEVICE_WXPUB_AUTH(7,"续费微信公众号"),
    DEVICE_WXWORK_AUTH(8,"续费企业微信"),
    CDKEY_AGENT_RECHARGE(9,"代理用户充值"),
    DEVICE_TIKTOK_AUTH(10,"续费抖音机器人"),
    KUAIZHAN_DOMIAN_REBUY(11,"续费快站域名"),
    DING_WARNING_GROUP_MSG_BUY(12,"购买钉钉群报警消息数"),

    ;

    private Integer id;
    private String desc;

    AlipayTypeEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static AlipayTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (AlipayTypeEnum type: AlipayTypeEnum.values()) {
            if (type.getId().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
